#pragma once
#include <QWidget>
#include<QPixmap>
#include<qlabel.h>
#include<QPushButton>
#include<QTimer>
class Widget : public QWidget
{
	Q_OBJECT

public:
	Widget(QWidget* parent = nullptr);
	~Widget();
	void updateRoleAnimationx();
	void updateRoleAnimationz();
	void updateRoleAnimationd();
	bool eventFilter(QObject* watched, QEvent* ev)override;
	void initBtn();
	void playx();
	void playz();
	void playd();
private:
	QLabel* roleLabel;
	qint8 curFrame;
	QPushButton* xBtn;
	QPushButton* zBtn;
	QPushButton* dBtn;
	QPushButton* closeBtn;
	QTimer* updateTimer = new QTimer(this);
};
